#ifndef __SHMEM_PUB_H__
#define IPC_SHM			100
#define IPCKEY_SEMS  		IPC_SHM + 1
#define IPC_ACCESS		201
#define SEM_MAX    		2
#define SHM_FILE  		"/etc/passwd"
#define SHM_OPEN    		0666 | IPC_CREAT	
#define SEM_OPEN   		0666
#define SEM_OPS   		0

#define SEM_SHM			0
#define SEM_RIGHT		1

int SetSHMData_Public(int input);
int GetSHMData_Public();

/************** semaphore control*******************************/
int 	InitSems();
int 	GetSemsID();
int 	CreateSems();
int 	WaitSem(int index);
int 	PostSem(int index);
void 	DestorySem();
/***************************************************************/
/************** SHM control *************************************/
int 	SizeOf(int iIPCKey);
int 	GetIPCkey(int key);
int 	CheckIsExist(int iIPCKey);
int 	CreateSHM(int iIPCKey, int size_val);
int 	DestorySHM(int iIPCKey);
int 	SetSHMData(int iIPCKey,void * param, int paramlen);
void* 	GetSHMData(int iIPCKey,int* ilen);
/***************************************************************/
#endif
